import Layout from '@/view/layout.vue'
import FindHouse from '@/view/seconds/findhouse.vue'
import HomePage from '@/view/seconds/homepage.vue'
import Info from '@/view/seconds/info.vue'
import Myinfo from '@/view/seconds/myinfo.vue'

import Detail from '@/view/detail.vue'
import Login from '@/view/login.vue'
import Register from '@/view/register.vue'
import Collect from '@/view/collect.vue'
import MyHistory from '@/view/myhistory.vue'
import RentList from '@/view/rentlist.vue'
import ToRent from '@/view/torent.vue'
import HouseList from '@/view/houselist.vue'
import Serch from '@/view/serch.vue'
import Map from '@/view/map.vue'

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/homepage',
    children: [
      {
        name: 'findhouse',
        path: '/findhouse',
        component: FindHouse
      },
      {
        path: '/homepage',
        component: HomePage
      },
      {
        path: '/myinfo',
        component: Myinfo
      },
      {
        path: '/info',
        component: Info
      }
    ]
  },
  {
    name: 'detail',
    path: '/detail',
    component: Detail
  },
  {
    name: 'login',
    path: '/login',
    component: Login
  },
  {
    name: 'register',
    path: '/register',
    component: Register
  },
  {
    name: 'collect',
    path: '/collect',
    component: Collect
  },
  {
    name: 'myhistory',
    path: '/myhistory',
    component: MyHistory
  },
  {
    name: 'rentlist',
    path: '/rentlist',
    component: RentList
  },
  {
    name: 'torent',
    path: '/torent',
    component: ToRent
  },
  {
    name: 'houselist',
    path: '/houselist',
    component: HouseList
  },
  {
    name: 'serch',
    path: '/serch',
    component: Serch
  },
  {
    name: 'map',
    path: '/map',
    component: Map
  }
]

export default routes
